package org.liuyunfeng.clients;

import feign.Request;
import org.liuyunfeng.web.HelloController;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

@FeignClient(name = "urlFeign", contextId = "urlFeign", url = "localhost:8889", fallback = UrlFeignFallback.class)
public interface UrlFeign {

    /**
     * openFeign是根据入参加不加注解区分方法的
     * 当参数不加注解，被解析为请求体内容，并且是个json请求
     *
     * options我还没细看，好像是个例外
     */
    @GetMapping("/hello")
    String hello(Request.Options options, HelloController.Node node);
}
